<%@ page import="examinee.ExamineeInfo" %>
<%@ page import="com.opensymphony.xwork2.util.ValueStack" %>
<%@ page import="exam.TestPaperInfo" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page import="exam.ExamVar" %>
<%@ page import="account.AccountUtils" %>
<%@ page import="utils.Var" %>
<%@ page import="examinee.ExamineeVar" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
  <title>打印列表</title>
  <link href="../skin/default/global.css" rel="stylesheet" type="text/css"/>
  <style media="print">
    .admin-print {
      font-size: 13px;
    }

    .admin-print-table {
      border: 1px solid #000;
      width: 100%;
      border-collapse: collapse;
    }

    .admin-print-table thead th {
      padding: 5px;
      border: 1px solid #000;
      background: #CCCCCC;
      font-size: 14px;
    }

    .admin-print-table tbody td {
      padding: 5px;
      border: 1px solid #000;
    }

    #printObj {
      display: none
    }
  </style>
  <style media="screen">
    .admin-print {
      padding: 10px;
      font-size: 13px;
    }

    .admin-print-table {
      border: 1px solid #000;
      width: 100%;
      border-collapse: collapse
    }

    .admin-print-table thead th {
      padding: 5px;
      border: 1px solid #000;
      font-size: 14px;
    }

    .admin-print-table tbody td {
      padding: 5px;
      border: 1px solid #000;
      text-align: center
    }

    th.first, .admin-print-table tbody td.first {
      text-align: left
    }

    #printObj {
      text-align: right;
      padding: 5px;
    }

    #printObj input {
      padding: 3px
    }
  </style>
  <script>
    function printsetup() {
    　　wb.execwb(8, 1);
    }
    function printpreview() {
    　　wb.execwb(7, 1);
    }

    　　
    function printit()
    　　
    {
    　　wb.execwb(6, 6)
　　
    }

  </script>
</head>
<%
  if (!AccountUtils.hasRight(session, Var.RIGHT_STATISTIC)) throw new Exception("deny!");

  ValueStack vs = (ValueStack) request.getAttribute("struts.valueStack");
  Map<Long, TestPaperInfo> tmap = (Map<Long, TestPaperInfo>) vs.findValue("tmap");
  List<ExamineeInfo> elist = (List<ExamineeInfo>) vs.findValue("elist");
  int score = (Integer) vs.findValue("score");
%>
<body class="admin-print">
<%--<div id="printObj">--%>
  <%--<!--打印必须-->--%>
  <%--<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0></OBJECT>--%>
  <%--<input type="button" value="直接打印" onclick="printit()"/>--%>
  <%--<input type="button" value="打印预览" onclick="printpreview()"/>--%>
  <%--<input type="button" value="打印设置" onclick="printsetup()"/>--%>
<%--</div>--%>
<table cellpadding="0" cellspacing="0" class="admin-print-table">
  <thead>
    <tr>
      <th class="first">准考证号</th>
      <th style="width:80px">姓名</th>
      <th style="width:60px">成绩</th>
      <th style="width:100px">合格/不合格</th>
    </tr>
  </thead>
  <tbody>
    <%
      for(ExamineeInfo einfo : elist){
        TestPaperInfo tinfo = tmap.get(einfo.getEid());
        if(score == ExamineeVar.SCORE_TESTED && tinfo == null) continue;
    %>
    <tr>
      <td class="first"><%=einfo.getZkzh()%></td>
      <td><%=einfo.getEname()%></td>
      <td><%=tinfo.getScore() == -1 ? "未考" : String.valueOf(tinfo.getScore())%></td>
      <td><%=tinfo.getScore() < ExamVar.PASS_SCORE ? "不合格" : "合格"%></td>
    </tr>
    <%
      }
    %>
  </tbody>
</table>

</body>

</html>
